#pragma once

#include "Singleton.h"
#include "MysqlDao.h"

class MysqlManager : public Singleton<MysqlManager>
{
	friend class Singleton<MysqlManager>;
public:
	~MysqlManager();

	int regUser(const std::string& name, const std::string& email, const std::string& pwd);
	bool checkEmail(const std::string& name, const std::string& email);
	bool updatePwd(const std::string& name, const std::string& pwd);
	bool checkPwd(const std::string& name, const std::string& pwd, UserInfo& userInfo);
	std::shared_ptr<UserInfo> getUserInfo(int uid);

private:

private:
	MysqlDao m_dao;
};

